home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.text;
-
- import javax.swing.event.DocumentEvent;
- import javax.swing.undo.AbstractUndoableEdit;
- import javax.swing.undo.CannotRedoException;
- import javax.swing.undo.CannotUndoException;
-
- public class AbstractDocument$ElementEdit extends AbstractUndoableEdit implements DocumentEvent.ElementChange {
- // $FF: renamed from: e javax.swing.text.Element
- private Element field_0;
- private int index;
- private Element[] removed;
- private Element[] added;
-
- public AbstractDocument$ElementEdit(Element var1, int var2, Element[] var3, Element[] var4) {
- this.field_0 = var1;
- this.index = var2;
- this.removed = var3;
- this.added = var4;
- }
-
- public Element[] getChildrenAdded() {
- return this.added;
- }
-
- public Element[] getChildrenRemoved() {
- return this.removed;
- }
-
- public Element getElement() {
- return this.field_0;
- }
-
- public int getIndex() {
- return this.index;
- }
-
- public void redo() throws CannotRedoException {
- super.redo();
- Element[] var1 = this.removed;
- this.removed = this.added;
- this.added = var1;
- ((AbstractDocument.BranchElement)this.field_0).replace(this.index, this.removed.length, this.added);
- }
-
- public void undo() throws CannotUndoException {
- super.undo();
- ((AbstractDocument.BranchElement)this.field_0).replace(this.index, this.added.length, this.removed);
- Element[] var1 = this.removed;
- this.removed = this.added;
- this.added = var1;
- }
- }
-